package com.zzxz.practicaltrainingsys.service;

import com.zzxz.practicaltrainingsys.entity.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Service
public interface ProjectService {
    //查询所有项目
    List<Project> getProject();

    public List<String> getProjectNames();

    Map<String, Object> getProjectTime(Integer projectId);

    //根据项目id查取该项目的项目信息
    public Project getProjectById(Integer project_id);

    // 新增项目返回数据库生成的 project_id
    int insertProject(Project project); // 返回插入后的 project_id

    //编辑项目
    public int updateProject(Project project);
    //删除项目
    public int deleteProject(Project project);
    //根据学校编号查学校信息
    public School getSchoolById(Integer school_id);
    //根据学院编号查询学院信息
    public College getCollegeById(Integer college_id);
    //根据专业编号查询专业信息
    public Major getMajorById(Integer major_id);
    //根据年级编号查询年级信息
    public Grade getGradeById(Integer grade_id);
    //根据老师id查所有项目信息
    public List<Project> getProjectByTeacherId(Integer teacher_id);
    //根据学校、学院、专业、年级查取所有项目信息
    public List<Project> getProjectsByIds(Integer school_id, Integer college_id, Integer major_id, Integer grade_id);

    // 获取当前正在实训的学生数量
    Integer getNowStudents();

    List<Topic> getTopicsByProjectId(Integer project_id);

    List<Project> getProjectsByStudentInfo(Integer schoolId, Integer collegeId, Integer majorId, Integer gradeId);

    Project getProjectByProjectId(Integer projectId);
}
